Skip to content

Show lint names#6325

Closed
sammykim wants to merge 2 commits into
rust-lang:incomingfrom
sammykim:lint-name
Closed

Show lint names#6325
sammykim wants to merge 2 commits into
rust-lang:incomingfrom
sammykim:lint-name

Conversation

@sammykim

@sammykim sammykim commented May 8, 2013

Copy link
Copy Markdown
Contributor

Fix #3525.

@sammykim

sammykim commented May 9, 2013

Copy link
Copy Markdown
Contributor Author

Done.

bors added a commit that referenced this pull request May 9, 2013
@bors bors closed this May 9, 2013
@alexcrichton

Copy link
Copy Markdown
Member

When merging this with #6093, I went ahead and made these a bit more specific. It's not always the case that -W should be in front from what I could tell. There's three different cases of source emission now:

  • The lint level was by default, and the message has [(warn|forbid|deny) by default]
  • The lint level was set by the command line, and the appended message is [-(W|D|F) lint-name]
  • The lint level was set by some attribute, in which case a span_note is emitted with the source of the lint source.

Does that sound ok to you?

@sanxiyn

sanxiyn commented May 9, 2013

Copy link
Copy Markdown
Contributor

@alexcrichton The idea of #3525 was that the lint should always show its name so that its setting can be changed. [warn by default] would not accomplish that.

@alexcrichton

Copy link
Copy Markdown
Member

hmm... good point, I think I'll change it to [-W unused-imports (default)] just so it's known that it's a default instead of being passed on the command line.

flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 20, 2020
Rustup

r? `@ghost`

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants